import { createAction, Storage, LANG, delay, deepCopy } from '../../../utils'
import { ForMatBannerPicList } from '../../../utils/DataFormat'
import { request } from '../../../utils/NetUtil'

const defaultState = {
    coinsArray: [{ 'text': '币种1' }, { 'text': '币种2' }, { text: '币种3' }, { 'text': '币种4' }, { 'text': '币种5' }, { text: '币种6' },{ 'text': '币种1' }, { 'text': '币种2' }, { text: '币种3' }, { 'text': '币种4' }, { 'text': '币种5' }, { text: '币种6' }]
}
export default {
    namespace: 'trade',
    state: deepCopy(defaultState),
    reducers: {
        updateState(state, { payload }) {
            return { ...state, ...payload }
        },
    },
    effects: {
        *loadStorage(action, { call, put }) {
            const login = yield call(Storage.get, 'login', false)
            yield put({
                type:'updateState',
                payload:{
                    login, fetching: false
                }
              })
        },
    }
}
